package org.xtext.runtime.teleoreactive;

import org.xtext.runtime.formula.IFormula;
import org.xtext.runtime.util.Bindings;

public class TRRule {
	private IFormula condition;
	private ITRAction action;
	
	public TRRule(IFormula condition, ITRAction action) {
		this.condition = condition;
		this.action = action;
	}

	public IFormula condition() {
		return condition;
	}
	
	public ITRAction action() {
		return action;
	}

	public TRRule apply(Bindings bindings) {
		return new TRRule(condition.copy().apply(bindings), action.apply(bindings));
	}

	public TRRule copy() {
		return new TRRule(condition.copy(), action.copy());
	}
	
}
